const Mock = require('mockjs')
const fs = require('fs')

const data = Mock.mock({
    'list|4': [
        {
            "id": "@id",
            'name': '@cname(2, 3)',
            'city': '@city(true)'
        }
    ]
})

fs.writeFileSync('./data.json', JSON.stringify(data.list))